Repository navigation
Feature: a system is an AbstractTrees tree, children(system) - #235
Merged
StackEnjoyer merged 2 commits intoNov 8, 2026
Merged
Conversation
A System returns its objects and groups as built, other systems objects(system). A System and an ObjectGroup print as one tree into the given IO. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ield (review r1 F1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/coincident-hits #235 +/- ##
===========================================================
+ Coverage 92.39% 92.52% +0.13%
===========================================================
Files 85 85
Lines 4510 4509 -1
===========================================================
+ Hits 4167 4172 +5
+ Misses 343 337 -6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
TacHawkes
added a commit
that referenced
this pull request
Nov 8, 2026
StackEnjoyer
added a commit
that referenced
this pull request
Nov 8, 2026
* Test: coincident-boundary matrix for cemented lenses, beamsplitters and touching bodies (#167) * Feature: coincident hits of touching surfaces, the hint only speeds up the trace (#167) trace_all and trace_one collect all surfaces that a ray hits within get_coincidence_tolerance() (1 nm) of the closest hit as a chain of coincident hits. Objects whose bounding sphere lies beyond the closest hit are not tested. The hinted object is tested first, but its hit no longer wins over a closer one: among coincident hits, the hinted shape comes first. Parts of doublets and cube beamsplitters that are moved apart now show the air gap. * Bugfix: coincident hits without a shape are kept (#177) The shape of an Intersection is optional. Hits of objects with an own intersect3d that leave it empty were taken for duplicates of each other, such that only one of them stayed in the chain of coincident hits. Hits without a shape are now always kept; duplicates no longer arise, since the hinted object is not tested twice. * Internal: hit chains with one default tolerance, first_of shared by the hint order * Docs: core diagrams show coincident hits, the beyond-skip and the hint as an optimization * Style: argument names and label comments (AGENTS.md N1, C1) * Style: argument name in first_of_shape (N1) * Test: constant refractive indices as ConstantRefractiveIndex after #213 * Test: constant refractive indices as ConstantRefractiveIndex after #213 * Test: coincident boundaries read internals through one adapter, near-contact cases - All access to BMO internals of TestCoincidentBoundaries.jl in one adapter block; the tests use exported names, AbstractTrees.children and the coating getter, no component or beamlet fields - Beamlet split checked through the physical on-axis field for both models, with the documented Fresnel loss of the astigmatic beamlet at the uncoated back face of the plate - Separate touching plates with gaps and overlaps far below and far above the coincidence tolerance, and rotated and moved together - Benchmark adds the 50 lenses off the beam path (same code as #177) - Leftover lines removed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Test: thin splitter between plates checked ray by ray, no representation checks - The branches of the thin beamsplitter between touching plates are compared with the reference trace in position, direction and index of every ray (ray_error, shared with path_error) - Equal-glass doublet and triplet compared with the singlet by the sequence of media, not by the number of rays; the owner of a hit on coincident faces is no longer fixed - Benchmark name column wide enough for the crowded rows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Test: touching objects are one interface, stated as the target of the matrix Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Test: touching plates carry the Fresnel loss of one glass-glass interface - Polarized ray through touching plates at normal incidence: the flux n |E|² behind them is the Fresnel chain with one glass-glass step, none for equal glass; with a 1 µm gap two glass-air faces. @test_broken on master, passing with #178 - Fresnel transmission at normal incidence and the flux of a polarized ray as shared helpers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Bugfix: hinted objects in groups tested once, skip applies within groups (#177 review) - closest_hits descends into object groups, so the hinted object is skipped there too and the members beyond the closest hit are not tested - Contract: the bounding sphere of an object encloses every hit of its intersect3d, also of a method of its own; an object whose hits leave its shape returns NoBoundingSphere() (AbstractObject, bounding_sphere_of, AGENTS.md extension promise); tests for both object orders - Hint and tracing_step! docstrings: the hint only orders the tests - get_coincidence_tolerance: relation to the SDF surface threshold - Style: isbeyond, is_in_chain (N1); typed skip and target (D1) - Core diagram of trace_all shows closest_hits, skip and groups Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Bugfix: trace_all inferred again, skipped object boxed once, sphere tested once (#177 review r2) - Type assertion on the recursive closest_hits call; @nospecialize skip, since an immutable hinted object was boxed again for every part - Sphere pretest in the loop only once a hit is found; a group tests its sphere without a hit, an object leaves it to intersect3d - Comments on groups describe the current path; core.md diagram updated - Test: trace_all and trace_one inferred for System, grouped System and StaticSystem; allocations do not grow with the number of parts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Internal: group sphere test of closest_hits split into two statements, signatures reformatted Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Docs: core.md diagrams of the solver as plain yes/no flows, trace_all split into search and object hit, order of coincident hits stated Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Feature: a system is an AbstractTrees tree, children(system) (#235) * Internal: AbstractTrees.children(system) replaces _top_level (#234) A System returns its objects and groups as built, other systems objects(system). A System and an ObjectGroup print as one tree into the given IO. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Bugfix: render! of a system reads children(system), not the objects field (review r1 F1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: uitt_hu <hugo.uittenbosch@dlr.de> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: uitt_hu <hugo.uittenbosch@dlr.de> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: StackEnjoyer <93778924+StackEnjoyer@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features
AbstractTrees.children(system): top-level objects and groups as added, groups not flattenedSystemprints as one tree with aSystemroot, likeprint_tree(system)Bugfixes
showof aSystemorObjectGroupprinted tostdoutinstead of the givenIOrender!of a custom system without anobjectsfield threw aFieldErrorDoc changes
children(system)API.mdupdatedInternal changes
live_render!readchildren(system);_top_levelremovedCloses #234